# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=emacs-fossil
pkgver=0_git20230504
_fslhash=a5a35f440a
pkgrel=0
_pkgreal=vc-fossil
pkgdesc="Emacs VC backend for Fossil SCM"
url="https://tumbleweed.nu/r/vc-fossil"
arch="noarch"
license="GPL-3.0-or-later"
depends="cmd:emacs fossil"
makedepends="emacs-nox"
source="https://tumbleweed.nu/r/vc-fossil/tarball/$_fslhash/emacs-fossil-$_fslhash.tar.gz"
builddir="$srcdir/$pkgname-$_fslhash"
options="!check" # no tests provided

build() {
	emacs -batch -q -no-site-file -L . \
		-f batch-byte-compile \
		./*.el
}

package() {
	install -Dvm644 ./*.el ./*.elc \
		-t "$pkgdir"/usr/share/emacs/site-lisp/

	cd "$pkgdir"/usr/share/emacs/site-lisp
	emacs -batch -q -no-site-file \
		-eval "(loaddefs-generate \".\" \"$_pkgreal-loaddefs.el\")"
}

sha512sums="
88ed9872a8d7ebe79ef02130144059adbea484b1f3f183f201c5eab4e08062c7fbef7e60eb848b81f73979d970b7a36d875a8b298e4b7844d7895c336890ae09  emacs-fossil-a5a35f440a.tar.gz
"
